

clear all
set more off

cd "D:\Dropbox\Characteristics Factors\RFS_Replication"

****** Table 2, Panel C: expost beta for two average portfolios
cls
clear all

*erase ".\Result\Table2_PanelC_Avg.xls" 

quietly {

clear all
use ".\Data_Cleaned\avgspread_all.dta" 

foreach i in 0 9 10 {

xi: areg excessret factor if portfolio== `i', absorb(proxy) robust cluster(date)
outreg2 using ".\Result\Table2_PanelC_Avg.xls",excel append bdec(2) tdec(2) tstat noaster /*asterisk(coef) 2aster*/ addstat(Adjusted R-squared, e(r2_a))

}

clear all
use ".\Data_Cleaned\avgspread_all.dta" 

drop if proxy=="smb" | proxy=="smb_ff5"

foreach i in 0 9 10 {

xi: areg excessret factor if portfolio== `i', absorb(proxy) robust cluster(date)
outreg2 using ".\Result\Table2_PanelC_Avg.xls",excel append bdec(2) tdec(2) tstat noaster /*asterisk(coef) 2aster*/ addstat(Adjusted R-squared, e(r2_a))

}

}
